﻿#region Header

/*
    This file is part of ndoctor-statistics.

    ndoctor-statistics is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    ndoctor-statistics is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with ndoctor-statistics.  If not, see <http://www.gnu.org/licenses/>.
*/

#endregion Header

namespace Probel.NDoctor.Statistics
{
    using System;
    using System.Collections.Generic;

    public interface IChartQuery
    {
        #region Methods

        /// <summary>
        /// Gets the average execution time by component.
        /// </summary>
        /// <returns></returns>
        IEnumerable<Tuple<string, double>> GetAvgExecutionTimeByComponent();

        /// <summary>
        /// Gets the average execution time by methods.
        /// </summary>
        /// <returns>A chart to be dicplayed</returns>
        IEnumerable<Tuple<string, double>> GetAvgExecutionTimeByMethod();

        /// <summary>
        /// Gets the bottlenecks by methods.
        /// </summary>
        /// <returns>A chart to be dicplayed</returns>
        IEnumerable<Tuple<string, double>> GetBottlenecks();

        /// <summary>
        /// Get a graph of the average execution time of the methods by day
        /// </summary>
        /// <returns>A chart to be dicplayed</returns>
        IEnumerable<Tuple<DateTime, double>> GetExecutionTimeGraph();

        /// <summary>
        /// Gets the installation count by date.
        /// </summary>
        /// <returns>A chart with the installation count by dates</returns>        
        IEnumerable<Tuple<DateTime, long>> GetInstallationByDates();

        /// <summary>
        /// Gets the chart for session durations.
        /// </summary>
        /// <returns>
        /// A chart with the session durations
        /// </returns>
        IEnumerable<Tuple<DateTime, double>> GetSessionDurations();

        /// <summary>
        /// Gets the update count by date.
        /// </summary>
        /// <returns></returns>
        IEnumerable<Tuple<DateTime, long>> GetUpdateByDates();

        /// <summary>
        /// Gets the date of the usages the by component.
        /// </summary>
        /// <returns>
        /// A chart containing the data to be displayed in a chart
        /// </returns>
        IEnumerable<Tuple<string, double>> GetUsageByComponent();

        /// <summary>
        /// Gets the number of times the methods have been called.
        /// </summary>
        /// <returns>A chart to be dicplayed</returns>
        IEnumerable<Tuple<string, double>> GetUsageByMethods();

        /// <summary>
        /// Gets the version distribution of nDoctor.
        /// </summary>
        /// <returns>
        /// A graph showing what version is used and its percentage
        /// </returns>
        IEnumerable<Tuple<string, double>> GetVersionDistribution();

        /// <summary>
        /// Gets the life time by version in minutes.
        /// </summary>
        /// <returns>
        /// A graph to display the total minutes a version has lived
        /// </returns>
        IEnumerable<Tuple<string, double>> GetVersionLifeTime();

        #endregion Methods
    }
}